fix(orchestrator-form-widgets): avoid ActiveTextInput crash when fetch:response:value resolves to missing key#3074
Conversation
…safely Treat null or undefined JSONata results as empty string for ActiveTextInput fetch response values to avoid UI breakage while editing dynamic selector keys, and add tests for applySelectorString strict/lenient behavior.
Changed Packages
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3074 +/- ##
==========================================
+ Coverage 60.94% 60.96% +0.01%
==========================================
Files 2067 2067
Lines 63931 63974 +43
Branches 16599 16598 -1
==========================================
+ Hits 38965 38999 +34
- Misses 24733 24739 +6
- Partials 233 236 +3
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…g selectors Wrap JSONata compile/evaluate in applySelector with clear errors and lenient empty string/array fallbacks where already used for fetch responses. Skip invalid jsonata: body fields in useRequestInit instead of failing the whole request. Extend changeset and tests. Co-authored-by: Cursor <cursoragent@cursor.com>
…l input Coerce or empty non-string template results in evaluateFetchResponseSelectorTemplate, treat non-string JSONata results as empty in lenient applySelector paths, and guard SchemaUpdater object extraction. Update tests and changeset. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
karthikjeeyar
left a comment
There was a problem hiding this comment.
Verified locally, handles the invalid inputs or partial JSON data and doesn't break the UI anymore.
/approve
/lgtm



Hey, I just made a Pull Request!
Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3110
This fixes a runtime failure path in ActiveTextInput when fetch:response:value (JSONata) resolves to undefined/null — common while editing dynamic selector keys with fetch:retrigger.
Screen.Recording.2026-05-08.at.12.15.43.PM.mov
✔️ Checklist